home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / text / hyper / ADtoHT2_1.lha / Source.lha / MyLib.lha / string / strncasecmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-08  |  388 b   |  22 lines

  1. #include <string.h>
  2. #include <ctype.h>
  3.  
  4. /**************************************************************************/
  5.  
  6. int (strncasecmp)(const char *String1, const char *String2, size_t Size)
  7.  
  8. {
  9.   int Result;
  10.  
  11.   Result=0;
  12.   if (Size!=0)
  13.     {
  14.       while (!(Result=tolower(*String1)-tolower(*String2)) && *String1 && (--Size!=0))
  15.     {
  16.       String1++;
  17.       String2++;
  18.     }
  19.     }
  20.   return Result;
  21. }
  22.